<!DOCTYPE html>
<!--[if IE 8 ]><html class="ie8"><![endif]-->
<!--[if IE 9 ]><html class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html class="w3c"><!--<![endif]-->
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {load href="__CSS__/bootstrap.min.css"/}
    {load href="__CSS__/elpis.min.css"/}
    {load href="__STATIC__/font-awesome/css/font-awesome.min.css"/}
    {load href="__JS__/jquery-1.10.2.min.js"/}
    {load href="__JS__/bootstrap.bundle.min.js"/}

    <title>{$Think.config.CMS_APPNAME}</title>
    {block name="style"}{/block}
    <script>
        var APP = '';
        var ROOT = '';
        var PUBLIC = '/public';
        var COOKIE_PREFIX = '{$Think.config.COOKIE_PREFIX}';
    </script>
    <style>
        .layui-form {
            box-sizing: content-box;
        }
    </style>
</head>
<body>

<div class="wrapper">
    {block name="main"}{/block}
</div>

<!-- 引入js -->
{load href="__STATIC__/layer/layer.js"/}
{load href="__JS__/admin.js"/}
{load href="__JS__/jquery.form.min.js"/}

<!-- custom scrollbar plugin -->
<script type="text/javascript">
    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引

    $('.ajax_form_submit').click(function () {

        $('#myform').ajaxForm({
            success: complete,  // post-submit callback
            dataType: 'json'
        });

        function complete(data) {
            if (data.status == 1) {
                parent.layer.msg(data.info, {
                    icon: 1,
                    time: 5000 //2秒关闭（如果不配置，默认是3秒）
                });
                parent.location.reload();
                parent.layer.close(index);
            } else {
                layer.msg(data.info, {
                    icon: 2,
                    time: 2000 //2秒关闭（如果不配置，默认是3秒）
                });
            }
        }
    });
</script>

{block name="script"}{/block}
</body>
</html>